<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>title</title>
    <!--<link rel = "stylesheet" type="text/css" href = "css/jquery.fullpage.min.css" / >-->
    <link rel="stylesheet" type="text/css" href="css/main.css" />
    <link rel="stylesheet" type="text/css" href="css/index.css" />
</head>

<body>
    <div class="wrapper">
        <div class="section sectionA">
            <div class="bg"></div>
            <div class="word1"></div>
            <div class="word2"></div>
            <div class="word3"></div>
            <div class="web">
                <div class="circle"></div>
                <p>Web<br>前端</p>
            </div>
        </div>
        <div class="section sectionB">
            <div class="title-bg">
                <h2 class="title">为何那么多人选择前端 ?</h2>
            </div>
            <!--ul>li*4>.content>h3{我要就业}+p{大学毕业?<br>你也可以}^+h4{针对就业}+p{针对转行}-->
            <ul class='students'>
                <li>
                    <div class="content">
                        <h3>我要就业</h3>
                        <p>大学毕业?<br>你也可以</p>
                    </div>
                    <h4>针对就业</h4>
                    <p>学职业技能,从根本上解决毕业<br>就等于失业的困顿</p>
                </li>
                <li>
                    <div class="content">
                        <h3>我要就业</h3>
                        <p>大学毕业?<br>你也可以</p>
                    </div>
                    <h4>针对就业</h4>
                    <p>学职业技能,从根本上解决毕业<br>就等于失业的困顿</p>
                </li>
                <li>
                    <div class="content">
                        <h3>我要就业</h3>
                        <p>大学毕业?<br>你也可以</p>
                    </div>
                    <h4>针对就业</h4>
                    <p>学职业技能,从根本上解决毕业<br>就等于失业的困顿</p>
                </li>
                <li>
                    <div class="content">
                        <h3>我要就业</h3>
                        <p>大学毕业?<br>你也可以</p>
                    </div>
                    <h4>针对就业</h4>
                    <p>学职业技能,从根本上解决毕业<br>就等于失业的困顿</p>
                </li>
            </ul>
        </div>
        <div class="section sectionC">
            <div class="title-bg">
                <h2>专为你打造精品课程服务!</h2>
            </div>
            <div class="inner">
                <ul class='selection'>
                    <li>
                        <a data-index='0' href="javascript:void(0)"></a>
                        <a data-index='1' href="javascript:void(0)"></a>
                    </li>
                    <li>
                        <a data-index='2' href="javascript:void(0)"></a>
                        <a data-index='3' href="javascript:void(0)"></a>
                    </li>
                    <li>
                        <a data-index='4' href="javascript:void(0)"></a>
                        <a data-index='5' href="javascript:void(0)"></a>
                    </li>

                </ul>
                <ul class='lessons'>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                </ul>
            </div>
        </div>
        <div class="section sectionD">
            <div class="title-bg">
                <h2>实战项目接轨最热技术前沿!</h2>
            </div>
            <div class="fsbanner">
                <div>
                    <img src="images/cz1.gif" alt="">
                    <div class="info">
                        <h4>1.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
                <div>
                    <img src="images/cz2.gif" alt="">
                    <div class="info">
                        <h4>2.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
                <div>
                    <img src="images/cz3.gif" alt="">
                    <div class="info">
                        <h4>3.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
                <div>
                    <img src="images/cz4.gif" alt="">
                    <div class="info">
                        <h4>4.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
                <div>
                    <img src="images/cz5.gif" alt="">
                    <div class="info">
                        <h4>5.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
                <div>
                    <img src="images/cz6.gif" alt="">
                    <div class="info">
                        <h4>6.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
                <div>
                    <img src="images/cz7.gif" alt="">
                    <div class="info">
                        <h4>7.综合项目</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa dolor, illo distinctio adipisci omnis
                            molestias minus, nam in quis deleniti. Quis eos placeat error repellendus voluptas quo laboriosam,
                            aperiam dolores!</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="section sectionE">
            <div class="title-bg">
                <h2>他们比你就多了一步选择而已！</h2>
            </div>
            <div class="info-box">
                <div class="title"></div>
                <div class="table"></div>
            </div>
        </div>
    </div>
</body>

</html>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.fullpage.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('.wrapper').fullpage({
            afterLoad: function (link, index) {
                var that = this;
                setTimeout(function () {
                    $('.section').removeClass('now').eq(index - 1).addClass('now');
                }, 100)

            }
        });

    })
    $(function () {
        $('.selection>li>a').mouseenter(function () {
            console.log($(this).attr('data-index'));
            $('.selection>li>a').removeClass('active');
            $(this).addClass('active');
            $('.lessons>li').eq($(this).attr('data-index')).fadeIn().siblings().hide();
        })
        $('.selection>li>a').eq(0).mouseenter();
    })
    $(function () {
        // 总宽度
        var fsWidth = 960,
            itemWidth = 760,
            col = 7,
            space = (fsWidth - itemWidth) / (col - 1),
            initSpace = fsWidth / col;
        $('.fsbanner>div').each(function (index, ele) {
            $(ele).css({
                left: initSpace * index
            })
        })
        $('.fsbanner>div').mouseover(function () {
            var index = $(this).index();
            console.log('this:--' + index);
            $('.fsbanner>div').each(function (currentIndex, element) {
                console.log(currentIndex);
                if (currentIndex <= index) {
                    $(element).css({
                        left: currentIndex * space
                    })
                } else(
                    $(element).css({
                        left: (currentIndex - 1) * space + itemWidth
                    })
                )
            })
        }).mouseout(function () {
            $('.fsbanner>div').each(function (index, element) {
                $(element).css({
                    left: index * initSpace
                })
            })
        })
    })
</script>